# 输入年份判断是不是闰年。

if __name__ == '__main__':
    while True:
        print('输入年份：(输入-1退出)')
        input_data = input()
        try:
            year = int(input_data)
            if year == -1:
                print('再见')
                break
            elif year > 0 and year % 4 == 0 and year % 100 != 0 or year % 400 == 0:
                print('闰年')
            else:
                print('不是闰年')
        except:
            print('输入错误')